$(function() {
    $("a#blog").click(function() {
        //todo: make this load the blog into the div with ajax
        $("div#bodycontent").html($(this).attr('href'));
        return false;
    });

    function searchSongs() {
        $.get("/radio/music/search",
            { song : $("input#Song").val(),
                artist : $("input#Artist").val(),
            genre : $("input#Genre").val(),
            album : $("input#Album").val() }),
            function(data){
                $("div#search").html(data);
            }
    }

    $("input#searchButton").click(function() {
        searchSongs();
    });

    function rateSong() 
    {
        //todo: get selected option from select#rating and post it
        $.post("{{=URL('music','rate')}}",{ rating : 4 });
        return false;
    }

    //    $("form#rating").submit(rateSong());

});
